package com.zw.admin.server.dto;

import java.io.Serializable;
import java.util.List;

import org.apache.poi.ss.formula.functions.T;

import com.alibaba.fastjson.JSONObject;
import com.zw.admin.server.model.PSupplier;

public class ResponseInfo implements Serializable {

	private static final long serialVersionUID = -4417715614021482064L;

	private String code;
	private String message;
	private Object data;

	public ResponseInfo(String code, String message) {
		super();
		this.code = code;
		this.message = message;
		this.data = null;
	}
	
	public ResponseInfo(int code, String message,List<T> list) {
		super();
		JSONObject data= new JSONObject();
		data.put("list", list);
		this.code = String.valueOf(code);
		this.message = message;
		this.data = data;
	}
	
	public ResponseInfo(String code, String message,Object data) {
		super();
		this.code = code;
		this.message = message;
		this.data = data;
	}
	

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	/**
	 * @return the data
	 */
	public Object getData() {
		return data;
	}

	/**
	 * @param data the data to set
	 */
	public void setData(Object data) {
		this.data = data;
	}

	
}
